﻿@{
    Layout = null;
    ViewData["Title"] = "ShaiX";
}
<script src="~/js/vue.js"></script>
<script src="~/js/axios.js"></script>
<script src="~/element-ui/lib/index.js"></script>
<link rel="stylesheet" href="~/element-ui/lib/theme-chalk/index.css" />
<div id="app">
    <div slot="header" class="clearfix">
        <span>您正在做的业务是：人力资源--招聘管理--面试管理--面试筛选 </span>
    </div>
    <el-table :data="tableData"
              style="width: 100%"
              v-if="Xian">
        <el-table-column prop="ein_id"
                         label="档案编号"
                         width="180"
                         v-if="false">
        </el-table-column>
        <el-table-column prop="human_name"
                         label="姓名"
                         width="180">
        </el-table-column>
        <el-table-column prop="human_major_name"
                         label="职位名称"
                         width="180">
        </el-table-column>
        <el-table-column prop="interview_amount"
                         label="面试次数"
                         width="180">
        </el-table-column>
        <el-table-column prop="registe_time"
                         label="面试时间"
                         width="180">
        </el-table-column>
        <el-table-column prop="multi_quality_degree"
                         label="综合素质"
                         width="180">
        </el-table-column>
        <el-table-column label="操作">
            <template slot-scope="scope">
                <el-button size="mini"
                           v-on:click="Update(scope.row)">筛选</el-button>
            </template>
        </el-table-column>
    </el-table>
    <el-descriptions :column="3" border v-if="XianS">
        <el-descriptions-item>
            <el-button type="primary" v-on:click="QueD()">建议录用</el-button>
@*            <el-button type="primary" v-on:click="Jyms()">建议面试</el-button>*@
            <el-button v-on:click="Quxiao()">取消</el-button>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                职位分类
            </template>
            <el-input v-model="human_major_kind_name" readonly></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                职位名称
            </template>
            <el-input v-model="human_major_name" readonly></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                招聘类型
            </template>
            <el-select v-model="engage_type" placeholder="请选择招聘类型">
                <el-option label="校园招聘" value="校园招聘"></el-option>
                <el-option label="社会招聘" value="社会招聘"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                姓名
            </template>
            <el-input v-model="human_name"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                身份证号码
            </template>
            <el-input v-model="human_idcard" v-on:blur="getAge()"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                性别
            </template>
            <el-input v-model="human_sex" readonly></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                Email
            </template>
            <el-input v-model="human_email"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                电话
            </template>
            <el-input v-model="human_telephone"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                家庭电话
            </template>
            <el-input v-model="human_homephone"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                手机
            </template>
            <el-input v-model="human_mobilephone"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                住址
            </template>
            <el-input v-model="human_address"></el-input>
            @*<el-cascader v-model="human_address"
            :options="options1"
            v-on:change="handleChange"></el-cascader>*@
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                邮编
            </template>
            <el-input v-model="human_postcode"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                国籍
            </template>
            <el-select v-model="human_nationality" placeholder="请选择国籍" v-on:change="GuoJi()">
                <el-option v-for="item in guoJi"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                出生地
            </template>
            <el-input v-model="human_birthplace" readonly></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                生日
            </template>
            <el-input v-model="human_birthday" readonly></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                民族
            </template>
            <el-select v-model="human_race" placeholder="请选择民族" v-on:change="MinZu()">
                <el-option v-for="item in minZu"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                宗教信仰
            </template>
            <el-select v-model="human_religion" placeholder="请选择宗教信仰" v-on:change="ZongJiao()">
                <el-option v-for="item in zongJiao"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                政治面貌
            </template>
            <el-select v-model="human_party" placeholder="请选择政治面貌" v-on:change="ZhenZhiMianMao()">
                <el-option v-for="item in zhenZhiMianMao"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>

        <el-descriptions-item>
            <template slot="label">
                年龄
            </template>
            <el-input v-model="human_age" readonly="readonly"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                毕业院校
            </template>
            @*<el-input v-model="human_college"></el-input>*@
            <el-select v-model="human_college" placeholder="请选择">
                <el-option v-for="item in options"
                           :key="item.human_college"
                           :label="item.label"
                           :value="item.human_college">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                学历
            </template>
            <el-select v-model="human_educated_degree" placeholder="请选择学历" v-on:change="XueLi()">
                <el-option v-for="item in xueLi"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                教育年限
            </template>
            <el-select v-model="human_educated_years" placeholder="请选择教育年限" v-on:change="JiaoYuNianXian()">
                <el-option v-for="item in jiaoYuNianXian"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                学历专业
            </template>
            <el-select v-model="human_educated_major" placeholder="请选择学历专业" v-on:change="ZhuanYe()">
                <el-option v-for="item in zhuanYe"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                薪酬要求
            </template>
            <el-input v-model="demand_salary_standard"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                注册时间
            </template>
            <el-input v-model="regist_time" width="20px" readonly="readonly"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                特长
            </template>
            <el-select v-model="human_specility" placeholder="请选择特长" v-on:change="TeChang()">
                <el-option v-for="item in teChang"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                爱好
            </template>
            <el-select v-model="human_hobby" placeholder="请选择爱好" v-on:change="AiHao()">
                <el-option v-for="item in aiHao"
                           :key="item.pbc_id"
                           :lable="item.attribute_name"
                           :value="item.attribute_name">
                </el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                个人履历
            </template>
            <el-input type="textarea" v-model="human_history_records"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                备注
            </template>
            <el-input type="textarea" v-model="remark"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                推荐意见
            </template>
            <el-input type="textarea" v-model="recomandation"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                面试次数
            </template>
            <el-input v-model="interview_amount"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                形象评价
            </template>
            <el-select v-model="image_degree" placeholder="请选择等级">
                <el-option label="A" value="A"></el-option>
                <el-option label="B" value="B"></el-option>
                <el-option label="C" value="C"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                口才评价
            </template>
            <el-select v-model="native_language_degree" placeholder="请选择等级">
                <el-option label="A" value="A"></el-option>
                <el-option label="B" value="B"></el-option>
                <el-option label="C" value="C"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                外语能力
            </template>
            <el-select v-model="foreign_language_degree" placeholder="请选择等级">
                <el-option label="A" value="A"></el-option>
                <el-option label="B" value="B"></el-option>
                <el-option label="C" value="C"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                应变能力
            </template>
            <el-select v-model="response_speed_degree" placeholder="请选择等级">
                <el-option label="A" value="A"></el-option>
                <el-option label="B" value="B"></el-option>
                <el-option label="C" value="C"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                EQ
            </template>
            <el-select v-model="eQ_degree" placeholder="请选择等级">
                <el-option label="A" value="A"></el-option>
                <el-option label="B" value="B"></el-option>
                <el-option label="C" value="C"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                IQ
            </template>
            <el-select v-model="iQ_degree" placeholder="请选择等级">
                <el-option label="A" value="A"></el-option>
                <el-option label="B" value="B"></el-option>
                <el-option label="C" value="C"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                综合素质
            </template>
            <el-select v-model="multi_quality_degree" placeholder="请选择等级">
                <el-option label="A" value="A"></el-option>
                <el-option label="B" value="B"></el-option>
                <el-option label="C" value="C"></el-option>
            </el-select>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                面试人
            </template>
            <el-input v-model="register"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                面试时间
            </template>
            <el-input v-model="registe_time"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                面试评价
            </template>
            <el-input v-model="interview_comment"></el-input>
        </el-descriptions-item>
        <el-descriptions-item>
            <template slot="label">
                录用申请审核意见
            </template>
            <el-input type="textarea" v-model="pass_checkComment"></el-input>
        </el-descriptions-item>
    </el-descriptions>
</div>
<script type="text/javascript">
    var vue = new Vue({
        el: "#app",
        data: {
            tableData: [],
            Xian: true,
            XianS: false,
            aiHao: [],
            teChang: [],
            zhuanYe: [],
            jiaoYuNianXian: [],
            xueLi: [],
            zhenZhiMianMao: [],
            guoJi: [],
            zongJiao: [],
            minZu: [],
            //human_major_kind_id: sessionStorage.getItem("major_kind_id"),
            //human_major_kind_name: sessionStorage.getItem("major_kind_name"),
            //human_major_id: sessionStorage.getItem("major_id"),
            //human_major_name: sessionStorage.getItem("major_name"),
            engage_type: "",
            ein_id: "",
            interview_status: 2,
            human_sex: "",
            human_email: "",
            human_telephone: "",
            human_homephone: "",
            human_mobilephone: "",
            human_address: [],//地址

            human_postcode: "",
            human_nationality: "",
            human_birthplace: [],//出生地
            res_id: "",
            human_birthday: "",
            human_race: "",
            human_religion: "",
            human_party: "",
            human_idcard: "",
            human_age: "",
            human_college: "",
            options: [{
                human_college: '长沙理工大学',
                libel: '长沙理工大学'
            }, {
                human_college: '苏州农业大学',
                libel: '苏州农业大学'
            }, {
                human_college: '家里蹲大学',
                libel: '家里蹲大学'
            }],
            human_educated_degree: "",
            human_educated_years: "",
            human_educated_major: "",
            demand_salary_standard: "",
            regist_time: "",
            human_specility: "",
            human_hobby: "",
            human_history_records: "",
            remark: "",
            human_name: "",
            recomandation: "",//推荐意见
            check_status: 1,
            interview_amount: "",
            image_degree: "",
            native_language_degree: "",
            foreign_language_degree: "",
            response_speed_degree: "",
            eQ_degree: "",
            iQ_degree: "",
            multi_quality_degree: "",
            register: sessionStorage.getItem('userName'),//面试人
            registe_time: "",
            interview_comment: "",
            pass_checkComment: "",//录用申请审核意见

        },
        methods: {
            Select() {
                axios.get('/MianS/MsJlSel').then(res => {
                    this.tableData = res.data;
                    console.info("加载事件中的总集合：",this.tableData);
                });
            },
            selectState(rows) {
                if (rows.interview_status == 1) return "待面试"
            },
            FindHeBing() {
                axios.get("/JianLiGuanLi/HeBing").then(res => {
                    this.HeBingData = res.data;
                })
            },
            AiHao() {
                axios.get("/JianLiGuanLi/AiHao").then(res => {
                    this.aiHao = res.data;
                })
            },
            TeChang() {
                axios.get("/JianLiGuanLi/TeChang").then(res => {
                    this.teChang = res.data;
                })
            },
            ZhuanYe() {
                axios.get("/JianLiGuanLi/ZhuanYe").then(res => {
                    this.zhuanYe = res.data;
                })
            },
            JiaoYuNianXian() {
                axios.get("/JianLiGuanLi/JiaoYuNianXian").then(res => {
                    this.jiaoYuNianXian = res.data;
                })
            },
            XueLi() {
                axios.get("/JianLiGuanLi/XueLi").then(res => {
                    this.xueLi = res.data;
                })
            },
            ZhenZhiMianMao() {
                axios.get("/JianLiGuanLi/ZhengZhiMianMao").then(res => {
                    this.zhenZhiMianMao = res.data;
                })
            },
            GuoJi() {
                axios.get("/JianLiGuanLi/GuoJi").then(res => {
                    this.guoJi = res.data;
                })
            },
            ZongJiao() {
                axios.get("/JianLiGuanLi/ZongJiao").then(res => {
                    this.zongJiao = res.data;
                })
            },
            MinZu() {
                axios.get("/JianLiGuanLi/MinZu").then(res => {
                    this.minZu = res.data;
                })
            },
            tick() {
                var d = new Date();
                var y = d.getFullYear();
                var moth = d.getMonth() + 1;
                var date = d.getDate();
                var h = d.getHours();
                var m = d.getMinutes();
                var s = d.getSeconds();
                var hh = 20 - 1 - h;
                var mm = 60 - 1 - m;
                var ss = 60 - s;
                if (hh > 0) {
                    mm = mm + 60 * hh;
                }
                if (moth < 10) {
                    moth = "0" + moth;
                }
                if (date < 10) {
                    date = "0" + date;
                }
                if (h < 10) {
                    h = "0" + h;
                }
                if (m < 10) {
                    m = "0" + m;
                }
                if (s < 10) {
                    s = "0" + s;
                }
                if (mm < 10) {
                    mm = "0" + mm;
                }
                if (ss < 10) {
                    ss = "0" + ss;
                }
                this.regist_time = y + " - " + moth + " - " + date + " " + h + ": " + m + ": " + s;
            },
            Update(row) {
                console.info("uodateMians:",row);
                this.Xian = false;
                this.XianS = true;
                this.human_major_kind_name = row.human_major_kind_name;
                this.human_major_name = row.human_major_name;
                this.engage_type = row.engage_type;
                this.human_name = row.human_name;
                this.human_idcard = row.human_idcard;
                this.human_sex = row.human_sex;
                this.human_email = row.human_email;
                this.human_telephone = row.human_telephone;
                this.human_homephone = row.human_homephone;
                this.human_mobilephone = row.human_mobilephone;
                this.human_address = row.human_address;
                this.human_postcode = row.human_postcode;
                this.human_nationality = row.human_nationality;
                this.human_birthplace = row.human_birthplace;
                this.human_birthday = row.human_birthday;
                this.human_race = row.human_race;
                this.human_religion = row.human_religion;
                this.human_party = row.human_party;
                this.human_age = row.human_age;
                this.human_college = row.human_college;
                this.human_educated_degree = row.human_educated_degree;
                this.human_educated_years = row.human_educated_years;
                this.human_educated_major = row.human_educated_major;
                this.demand_salary_standard = row.demand_salary_standard;
                this.regist_time = row.regist_time;
                this.human_specility = row.human_specility;
                this.human_hobby = row.human_hobby;
                this.human_history_records = row.human_history_records;
                this.remark = row.remark;
                this.recomandation = row.recomandation;
                this.register = row.register;
                this.interview_amount = row.interview_amount;//面试次数
                this.image_degree = row.image_degree;//形象评价
                this.native_language_degree = row.native_language_degree;
                this.foreign_language_degree = row.foreign_language_degree;
                this.response_speed_degree = row.response_speed_degree;
                this.eQ_degree = row.eQ_degree;
                this.iQ_degree = row.iQ_degree;
                this.multi_quality_degree = row.multi_quality_degree;
                this.register = row.register;
                this.registe_time = row.registe_time;
                this.interview_comment = row.interview_comment;
                this.res_id = row.res_id;
            },
            //点击录用修改状态为2按钮
            QueD() {
                console.info("标记",this.pass_checkComment);
                axios.post('/JianLiGuanLi/UpdZt', {
                    Res_id: this.res_id,
                    Check_status:2,
                    Pass_checkComment: this.pass_checkComment
                }).then(res=>{
                    if(res.data>0){
                        alert("录用成功");
                        this.XianS = false;
                        this.Xian = true;
                        this.Select();
                        //this.Xian = true;
                    }
                })
            },
            Quxiao() {
                this.Xian = true;
                this.XianS = false;
            },
            tick() {
                var d = new Date();
                var y = d.getFullYear();
                var moth = d.getMonth() + 1;
                var date = d.getDate();
                var h = d.getHours();
                var m = d.getMinutes();
                var s = d.getSeconds();
                var hh = 20 - 1 - h;
                var mm = 60 - 1 - m;
                var ss = 60 - s;
                if (hh > 0) {
                    mm = mm + 60 * hh;
                }
                if (moth < 10) {
                    moth = "0" + moth;
                }
                if (date < 10) {
                    date = "0" + date;
                }
                if (h < 10) {
                    h = "0" + h;
                }
                if (m < 10) {
                    m = "0" + m;
                }
                if (s < 10) {
                    s = "0" + s;
                }
                if (mm < 10) {
                    mm = "0" + mm;
                }
                if (ss < 10) {
                    ss = "0" + ss;
                }
                this.regist_time = y + " - " + moth + " - " + date + " " + h + ": " + m + ": " + s;
            },
        },
        mounted() {
            this.Select();
            this.AiHao();
            this.TeChang();
            this.ZhuanYe();
            this.JiaoYuNianXian();
            this.XueLi();
            this.ZhenZhiMianMao();
            this.GuoJi();
            this.ZongJiao();
            this.MinZu();
            this.FindHeBing();
            window.onload = this.tick;
            var out = window.setInterval(this.tick, 1000);
        }
    })
</script>

